const mongoose=require("mongoose")
mongoose.connect("mongodb+srv://sh104024:SHIhui104024@cluster0.lvba9.mongodb.net/xiangmu2").then(()=>{
    console.log("连接成功");
    
})
.catch(error=>console.log("连接失败",error))
let userSchema=mongoose.Schema({
    username:String,
    password:String,
    phone:Number
})
let user=mongoose.model("user",userSchema,"user")
let storeSchema=mongoose.Schema({
    imgs:String,
    title:String,
    address:String,
    phone:String,
})
let store = mongoose.model("store",storeSchema,"store")

module.exports={user,store}